package com.ce.server.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ce.server.common.AdminVo;
import com.ce.server.common.StudentVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 郑爽
 * @since 2021-11-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_checkin")
@ApiModel(value="Checkin对象", description="")
public class Checkin implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "学生学号")
    private String sno;

    @ApiModelProperty(value = "学生姓名")
    private String sname;

    @ApiModelProperty(value = "学生")
    @TableField(exist = false)
    private StudentVo studentVo;

    @ApiModelProperty(value = "入校地点，南门或者北门")
    private String address;


    @ApiModelProperty(value = "入校时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createtime;

    @ApiModelProperty(value = "y代表绿码 n代表非绿码")
    private String jkm_status;

    @ApiModelProperty(value = "值班人员工号")
    private String wno;

    @ApiModelProperty(value = "员工")
    @TableField(exist = false)
    private AdminVo adminVo;

}
